<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>丛编管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        jQuery.extend(jQuery.validator.messages, {
            required: "必填"
        });
        $(document).ready(function () {
            if ("${message}" != "" && "${message}" != "null") {
                showTip("${message}");
            }
            $("#publisherForm").validate({
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorPlacement: function (error, element) {
                    if (element.parent().is(".input-append")) {
                        error.innerHTML = "必填";
                        error.innerText = "必填";
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
        function popclose(){
            window.parent.window.jBox.close();
        }
    </script>
    <style>
        .form-horizontal .controls {
            margin-left: 100px;
        }

        .form-horizontal .control-label {
            width: 80px;
        }

        .input_ln {
            width: 180px;
        }
    </style>
</head>
<body>
<form:form id="publisherForm" modelAttribute="bkPublisher" action="${ctx}/book/publisher/save" method="post"
           class="form-horizontal">
    <form:input id="prId" path="prId" type="hidden"/>
    <table style="margin-top: 5px;" class="table table-striped table-bordered table-condensed">
        <tr>
            <th width="80">出版社</th>
            <td>
                <form:input id="prName" path="prName" type="text" class="required valid input_ln"/>
                <span class="help-inline"><font color="red">*</font> </span>
            </td>
        </tr>
        <tr>
            <th width="80">所在城市</th>
            <td>
                <form:input id="prAddress" path="prAddress" type="text" class="required valid input_ln"/>
                <span class="help-inline"><font color="red">*</font> </span>
            </td>
        </tr>
        <tr>
            <th width="80">出版社拼音</th>
            <td>
                <form:input id="prPy" path="prPy" type="text" class="required valid input_ln"/>
                <span class="help-inline"><font color="red">*</font> </span>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input class="btn btn-primary" style="margin-left: 120px;" type="submit" value="保存"/>
                <input class="btn btn-primary" onclick="popclose()" type="button" value="关闭"/>
            </td>
        </tr>
    </table>
</form:form>
</body>
</html>